import request from '@/utils/request'

// 查询素材管理列表
export function listAttachment(query) {
  return request({
    url: '/store/attachment/list',
    method: 'get',
    params: query
  })
}

// 查询素材管理详细
export function getAttachment(attId) {
  return request({
    url: '/store/attachment/' + attId,
    method: 'get'
  })
}

// 新增素材管理
export function addAttachment(data) {
  return request({
    url: '/store/attachment',
    method: 'post',
    data: data
  })
}

// 修改素材管理
export function updateAttachment(data) {
  return request({
    url: '/store/attachment',
    method: 'put',
    data: data
  })
}

// 删除素材管理
export function delAttachment(attId) {
  return request({
    url: '/store/attachment/' + attId,
    method: 'delete'
  })
}

// 导出素材管理
export function exportAttachment(query) {
  return request({
    url: '/store/attachment/export',
    method: 'get',
    params: query
  })
}